package domain.entities;

import javax.persistence.*;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Suplementalcrfcsp entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "suplementalcrfcsp", catalog = "bms")
public class Suplementalcrfcsp implements java.io.Serializable {

	// Fields

	private Integer id;
	private ProtocoloCentro protocoloCentro;
	private Date dateReceived;
	private Date dateSentToSite;
	private Date dateSiteSentToUsa;
	private Date fechaEvento;
	private Integer fedExId;
	private String paciente;
    private Integer scope;

    public static final String CLASSTITLE = "Supplemental CRFs/CSP";
    public static final LinkedHashMap<String, String> TITULOS = new LinkedHashMap<String, String>(
            Collections.unmodifiableMap(
                    new LinkedHashMap<String, String>() {
                        {
                            put("paciente", "Paciente");
                            put("fechaEvento", "Fecha del Evento");
                            put("dateReceived", "Date Received");
                            put("dateSentToSite", "Date Sent to Site");
                            put("dateSiteSentToUsa", "Date Site Sent to USA");
                            put("fedExId", "FedEx #");
                        }
                    }
            )
    );

    // Constructors

	/** default constructor */
	public Suplementalcrfcsp() {
	}

	/** minimal constructor */
	public Suplementalcrfcsp(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	/** full constructor */
	public Suplementalcrfcsp(ProtocoloCentro protocoloCentro,
			Date dateReceived, Date dateSentToSite, Date dateSiteSentToUsa,
			Date fechaEvento, Integer fedExId, String paciente) {
		this.protocoloCentro = protocoloCentro;
		this.dateReceived = dateReceived;
		this.dateSentToSite = dateSentToSite;
		this.dateSiteSentToUsa = dateSiteSentToUsa;
		this.fechaEvento = fechaEvento;
		this.fedExId = fedExId;
		this.paciente = paciente;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "PROTOCOLO_CENTROCENTROid", referencedColumnName = "CENTROid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaisprotocoloid", referencedColumnName = "protocolo_compromisopaisprotocoloid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaiscompromisopaisid", referencedColumnName = "protocolo_compromisopaiscompromisopaisid", nullable = false) })
	public ProtocoloCentro getProtocoloCentro() {
		return this.protocoloCentro;
	}

	public void setProtocoloCentro(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dateReceived", length = 10)
	public Date getDateReceived() {
		return this.dateReceived;
	}

	public void setDateReceived(Date dateReceived) {
		this.dateReceived = dateReceived;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dateSentToSite", length = 10)
	public Date getDateSentToSite() {
		return this.dateSentToSite;
	}

	public void setDateSentToSite(Date dateSentToSite) {
		this.dateSentToSite = dateSentToSite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dateSiteSentToUSA", length = 10)
	public Date getDateSiteSentToUsa() {
		return this.dateSiteSentToUsa;
	}

	public void setDateSiteSentToUsa(Date dateSiteSentToUsa) {
		this.dateSiteSentToUsa = dateSiteSentToUsa;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "fechaEvento", length = 10)
	public Date getFechaEvento() {
		return this.fechaEvento;
	}

	public void setFechaEvento(Date fechaEvento) {
		this.fechaEvento = fechaEvento;
	}

	@Column(name = "fedExId")
	public Integer getFedExId() {
		return this.fedExId;
	}

	public void setFedExId(Integer fedExId) {
		this.fedExId = fedExId;
	}

	@Column(name = "paciente")
	public String getPaciente() {
		return this.paciente;
	}

	public void setPaciente(String paciente) {
		this.paciente = paciente;
	}

    @Column(name = "scope")
    public Integer getScope() {
        return scope;
    }

    public void setScope(Integer scope) {
        this.scope = scope;
    }
}